package com.lvshi0797.cms.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

 
@Entity
@Table(name="f_manager")
public class FManager implements Serializable {

	private static final long serialVersionUID = 1L;

	private int id;
	/**
	 * 添加以后不让修改
	 */
	private String username;

	private String password;
	/**
	 * 关联手机
	 */
	private String phone;

	/**
	 * 填报单位名称，各乡镇残联
	 */
	private String deptName;
	
	private Date addTime;

	/**
	 * 所辖乡镇，关联乡镇,添加以后不让修改
	 */
	private String town;
	/**
	 * 是否可用 1表示可用，0表示禁用，默认是1，启用
	 */
	private int isEnabled;
	/**
	 * 是否后台管理员 0 表示不是，1表示是后台管理员。默认为0，不是管理员
	 */
	private int isAdmin;
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	@Column(length=30,nullable=false,unique=true,updatable=false)
	public String getUsername() {
		return username;
	}
	@Column(length=60)
	public String getPassword() {
		return password;
	}
	@Column(length=20,unique=true)
	public String getPhone() {
		return phone;
	}
	@Column(length=20)
	public String getDeptName() {
		return deptName;
	}
	@Temporal(TemporalType.TIMESTAMP)
	public Date getAddTime() {
		return addTime;
	}
	@Column(length=20)
	public String getTown() {
		return town;
	}
	public int getIsEnabled() {
		return isEnabled;
	}
	public int getIsAdmin() {
		return isAdmin;
	}
	public void setId(int id) {
		this.id = id;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}
	public void setTown(String town) {
		this.town = town;
	}
	public void setIsEnabled(int isEnabled) {
		this.isEnabled = isEnabled;
	}
	public void setIsAdmin(int isAdmin) {
		this.isAdmin = isAdmin;
	}
	public FManager() {
		super();
		// TODO Auto-generated constructor stub
	}
	public FManager(String username, String password, String deptName,
			String town) {
		super();
		this.username = username;
		this.password = password;
		this.deptName = deptName;
		this.town = town;
		this.isEnabled = 1;
	}
	
	

 

}
